package com.xiao.springmvc.controller.company;

import com.xiao.springmvc.entity.CompanyImage;
import com.xiao.springmvc.entity.CompanyInfo;
import com.xiao.springmvc.entity.jdo.CompanyGetJdo;
import com.xiao.springmvc.entity.jdo.CompanyIntroduceJdo;

public class CompanyJson {

	public Object companyGetJson(CompanyInfo companyInfo,CompanyImage companyImage){

		CompanyGetJdo jdo = new CompanyGetJdo();
		jdo.setCompanyId(companyInfo.getId());
		jdo.setCompanyName(companyInfo.getName());
		jdo.setCompanyPicture(companyImage.getFilepath());
		jdo.setBtnLayoutType(companyImage.getBtnLayoutType());
		jdo.setRoleWalkType(companyImage.getRoleWalkType());
		
		return jdo; 
	}
	
	public Object companyIntroduceJson(CompanyInfo companyInfo,CompanyImage companyImage){
		CompanyIntroduceJdo jdo = new CompanyIntroduceJdo();
		jdo.setCompanyId(companyInfo.getId());
		jdo.setCompanyName(companyInfo.getName());
		jdo.setIntroduce(companyInfo.getContent());
		return jdo;
	}
	
}
